<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
import { watch } from "vue"
import { useRouter } from "vue-router";
import { useStore } from "vuex"
export default {
  setup(){
    const store=useStore(),
     router = useRouter();
      watch(
      () => {
        return router.currentRoute.value.name;
      },
      (val) => {
        console.log(val);
        store.commit("setChange",val)
      }
      )
  }
}
</script>
<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}
</style>
